package com.xuxin.baby.adapter;

import android.widget.ImageView;

import com.blankj.utilcode.util.LogUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xuxin.baby.R;
import com.xuxin.baby.bean.UserProductBean;
import com.xuxin.baby.glide.GlideApp;
import com.xuxin.baby.network.Retrofit;

import org.jetbrains.annotations.NotNull;

/**
 * Created by xu_xin
 * Created on 2020.08.04 0004
 * vip产品
 */
public class UserVipAdapter extends BaseQuickAdapter<UserProductBean.ResultBean.ItemsBean, BaseViewHolder> {

    public UserVipAdapter() {
        super(R.layout.item_user_vip);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, UserProductBean.ResultBean.ItemsBean item) {
        /**
         * 图片加载
         */
        ImageView item_user_vip_image = holder.getView(R.id.item_user_vip_image);
        String vipImage = Retrofit.image_url + item.getImageUrl();
        LogUtils.e("vip产品" + vipImage);
        GlideApp.with(getContext()).load(vipImage).centerInside().into(item_user_vip_image);
    }
}